home *** CD-ROM | disk | FTP | other *** search
/ Experimental BBS Explossion 3 / Experimental BBS Explossion III.iso / msdos / mxmenu.zip / QUICKNOV.MNU < prev    next >
Text File  |  1992-12-01  |  4KB  |  176 lines

  1. Comment
  2. ==========================================================
  3.  
  4. Copyright 1990-92 by Marc Perkel * All right reserved.
  5.  
  6. This menu is a sample of a Novell ready menu. You can easilly modify it
  7. to suit your needs.
  8.  
  9. To add a choice to a menu simply use the AddChoice command
  10. then add the appropiate Onkey statement.
  11. The menu will make the size adjustments accordinaly.
  12.  
  13.   Example:
  14.       AddChoice("Print Console",10)
  15.       ...
  16.       ...
  17.       OnKey Task(10)
  18.         PConsole
  19.       ...
  20.  
  21. If you want to change the menu's center, pass the XY
  22. coordinates to menu's CenterStretchBox procedure.
  23.  
  24.    Example:
  25.       CenterStretchBox("Menu Header",40,12)
  26.  
  27. This will cause the menu to center at Col 40, Row 12
  28.  
  29. Instead of defining the center of the box, there is a command
  30. CornerStretchBox where the box grows down and right.
  31.  
  32.    Example:
  33.       CornerStretchBox("Menu Header",8,6)
  34.  
  35. To control custom features, edit CUSTOM.INC and other INCLUDE Files.
  36.  
  37. =========================================================
  38. EndComment
  39.  
  40. ;------ Create Variables
  41.  
  42. var
  43.   NovVar
  44.   KeepUsersInMenu
  45.  
  46. KeepUsersInMenu = False    ;set to True if you want to lock in users
  47.  
  48. MyServer = NovDefaultServer
  49. Station  = Str(NovConnection)
  50. UserName = NovMyLoginName
  51.  
  52. ;------ Read network address
  53.  
  54. NetAddress = NovStationAddress (NovConnection)
  55.  
  56. ;------ Personalize Your Screen Messages
  57.  
  58. StatusLineText = 'User: ' + UserName + '  *  Server: ' + MyServer
  59. StatusLineText = StatusLineText + '  *  Address: ' + NetAddress
  60. if length(StatusLineText) < 64
  61.    StatusLineText = StatusLineText + '  *  Dos: ' + DosVersionString
  62. endif
  63.  
  64. MenuTitle = 'Computer Tyme Master Menu'
  65.  
  66. Comment
  67. ==========================================================
  68.  
  69. If you want to branch to a personal menu then this routine test for the
  70. existence of a menu in the users H: directory with the same name as the
  71. users login name. It then sets an environment variable indicating if it
  72. was found. This keeps the menu fast because the test need only be made
  73. once.
  74.  
  75. ==========================================================
  76. EndComment
  77.  
  78. ;------ Set Personal Menu if Environment Variable PMENU exists.
  79.  
  80. PersonalMenu = ReadEnv('PMENU')
  81.  
  82. ;------ Load menu look and feel include files
  83.  
  84. Include 'CUSTOM.INC'
  85.  
  86. Comment
  87. ==========================================================
  88.  
  89. MarxMenu is capable of software metering. This means that it can limit
  90. the number of users of an application to a fixed amount.
  91.  
  92.   OnKey Task (2)
  93.      |if Limit('LOTUS',6) then Return  ;limit Lotus to 6 Users
  94.      CD \PUBLIC\LOTUS
  95.      123
  96.  
  97. Read the METER.INC file for more details.
  98.  
  99. ==========================================================
  100. EndComment
  101.  
  102. Include 'METER.INC'    ;Software Metering
  103.  
  104. Comment
  105. =================================
  106.  
  107. In order to add menu choices conditionally you would append the
  108. choices to the end of the array after all the default choices
  109. are set. For Example:
  110.  
  111.    if InGroup("ACCOUNTING")
  112.       AddChoice("Payroll Menu",10)
  113.    endif
  114.  
  115. Here is where menus are created.
  116.  
  117. =================================
  118. EndComment
  119.  
  120.  
  121. ;=============[ Main Menu ]============*
  122.  
  123. AddChoice('Accounting',1)
  124. AddChoice('Word Processing',2)
  125. AddChoice('SpreadSheet',3)
  126. AddChoice('DataBase',4)
  127. AddChoice('Communication',5)
  128. AddChoice('Utilities',20)
  129. if PersonalMenu > '' then AddChoice('Personal Menu',25)
  130.  
  131. CornerStretchBox ('Main Menu',11,6)
  132.  
  133. OnKey Task(1)
  134.    |Error('Put Code for Accounting here.')
  135. ;  cd\account
  136. ;  acc
  137.  
  138.  
  139. OnKey Task(2)
  140.    |Error('Put Code for Word Processing here.')
  141. ;  cd\wordperf
  142. ;  wp
  143.  
  144.  
  145. OnKey Task(3)
  146.    |Error('Put Code for SpreadSheet here.')
  147. ;  cd\lotus
  148. ;  123
  149.  
  150.  
  151. OnKey Task(4)
  152.    |Error('Put Code for DataBase here.')
  153.  
  154.  
  155. OnKey Task(5)
  156.    |Error('Put Code for Communication here.')
  157.  
  158.  
  159. OnKey Task(20)  ;Utilities
  160.    ^Util
  161.  
  162.  
  163. OnKey Task(25)
  164.    |Bat 'Marx ' + PersonalMenu
  165.  
  166.  
  167. OnKey ESC
  168.    |if NovConsoleOperator or not KeepUsersInMenu
  169.    |   LeaveMenu
  170.    |endif
  171.  
  172.  
  173. ;=============[ Utilities ]============*
  174.  
  175. Include "UTILS.INC"
  176.